﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TheNorthStar.Web.Application.Services;
using TheNorthStar.Web.Models.ViewModels;

namespace TheNorthStar.Web.Controllers
{
    public class AdminController : Controller
    {
        //
        // GET: /Admin/
        private readonly IBookingService _bookingService;

        public AdminController(IBookingService bookingService)
        {
            _bookingService = bookingService;
        }

        public ActionResult Index()
        {
            AdminHomeViewModel model = new AdminHomeViewModel {Bookings = _bookingService.GetAll().ToList()};
            return View(model);
        }

    }
}
